import request2 from '@/utils/request2';
import { faceApiUrl } from '@/api/config'


// 分页查询
export function getSubcontractorList(data) {
    return request2({
        url: faceApiUrl + '/safetySubcontractorPost/getPageSafetySubcontractorPost',
        method: 'post',
        data
    })
}

// 删除分包安全员台账
export function delSubcontractor(id) {
    return request2({
        url: faceApiUrl + '/safetySubcontractorPost/deleteByPrimaryKey/' + id,
        method: 'get',
    })
}

// 获取分包安全员台账信息
export function getSubcontractorDetail(params) {
    return request2({
        url: faceApiUrl + '/safetySubcontractorPost/getSafetySubcontractorPostById',
        method: 'get',
        params
    })
}

// 添加分包安全员台账
export function addSubcontractor(data) {
    return request2({
        url: faceApiUrl + '/safetySubcontractorPost/insertSelective',
        method: 'post',
        data
    })
}

// 修改分包安全员台账
export function updateSubcontractor(data) {
    return request2({
        url: faceApiUrl + '/safetySubcontractorPost/updateByPrimaryKeySelective',
        method: 'post',
        data
    })
}

// 分包人员查询
export function getContractorManager(data) {
    return request2({
        url: 'cscec-project-domain/contractor-manager/mem/query',
        method: 'post',
        data
    })
}